<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class mgameinstruction extends MY_Model {

    var $theme_data = array(
        'layout_main' => 'layout',
        'left' => 'include/leftcp',
    );
    public $mytable = "game_instruction";
    public $primaryKey = "gins_id";
    public $resCode = "GAME_INSTRUCTION";
	var $key_define;
    function __construct() {
        parent::__construct();
		$this->key_define = array();
		$this->key_define['0'] = '[0]';
		$this->key_define['1'] = '[1]';
		$this->key_define['2'] = '[2]';
		$this->key_define['3'] = '[3]';
		$this->key_define['4'] = '[4]';
		$this->key_define['5'] = '[5]';
		$this->key_define['6'] = '[6]';
		$this->key_define['7'] = '[7]';
		$this->key_define['8'] = '[8]';
		$this->key_define['9'] = '[9]';
		$this->key_define['A'] = '[A]';
		$this->key_define['B'] = '[B]';
		$this->key_define['C'] = '[C]';
		$this->key_define['D'] = '[D]';
		$this->key_define['E'] = '[E]';
		$this->key_define['F'] = '[F]';
		$this->key_define['G'] = '[G]';
		$this->key_define['H'] = '[H]';
		$this->key_define['I'] = '[I]';
		$this->key_define['J'] = '[J]';
		$this->key_define['K'] = '[K]';
		$this->key_define['L'] = '[L]';
		$this->key_define['M'] = '[M]';
		$this->key_define['N'] = '[N]';
		$this->key_define['O'] = '[O]';
		$this->key_define['P'] = '[P]';
		$this->key_define['Q'] = '[Q]';
		$this->key_define['R'] = '[R]';
		$this->key_define['S'] = '[S]';
		$this->key_define['T'] = '[T]';
		$this->key_define['U'] = '[U]';
		$this->key_define['V'] = '[V]';
		$this->key_define['W'] = '[W]';
		$this->key_define['X'] = '[X]';
		$this->key_define['Y'] = '[Y]';
		$this->key_define['Z'] = '[Z]';
		$this->key_define['ADSW'] = '[WASD]';
		$this->key_define['MOUSE_LEFT'] = '[Chuột trái]';
		$this->key_define['MOUSE_RIGHT'] = '[Chuột phải]';
		$this->key_define['MOUSE'] = '[Chuột]';
		$this->key_define['KEY_UP'] = '[Phím mũi tên lên]';
		$this->key_define['KEY_DOWN'] = '[Phím mũi tên xuống]';
		$this->key_define['KEY_RIGHT'] = '[Phím mũi tên phải]';
		$this->key_define['KEY_LEFT'] = '[Phím mũi tên trái]';
		$this->key_define['KEY_LEFT_RIGHT'] = '[Phím mũi tên trái, phải]';
		$this->key_define['KEY_UP_DOWN'] = '[Phím mũi tên lên,xuống]';
		$this->key_define['UP_DOWN_LEFT_RIGHT'] = '[Phím 4 mũi tên]';
		$this->key_define['SHIFT_LEFT'] = '[Phím Shift trái]';
		$this->key_define['SHIFT_RIGHT'] = '[Phím Shift phải]';
		$this->key_define['SHIFT'] = '[Phím Shift]';
		$this->key_define['SPACE'] = '[Khoảng trắng]';
		$this->key_define['CTRL'] = '[Ctrl]';
		$this->key_define['ENTER'] = '[Enter]';
		$this->key_define['NULL'] = '[Null]';
		
    }

    function field() {
		$fieldData = array();
		$fieldData['game_id'] = 0;
		$fieldData['gins_key'] = '';
		$fieldData['gins_description'] = '';
		$fieldData['gins_pre_description'] = '';
		$fieldData['gins_note'] = '';
		return $fieldData;
    }
	
	function get_image($key = ''){
		if(isset($this->key_define[$key]))
			return base_url().'template/images/key/key_'.strtolower($key).'.gif';
		return '';
	}
}

?>